mixin flash({img, back})

  -var w = images[img].width
  -var h = images[img].height
  -var flashUrl = images[img].url
  -var backUrl = back || back == 0 ? images[back].url : ''

  svg.Flash(
      style=`display: inline-block; width: 100%; vertical-align: top; background-position: 0% 0%;
        background-repeat: no-repeat; background-size:100% 100%; background-attachment: scroll; 
        -webkit-tap-highlight-color:transparent;-webkit-user-select:none;line-height:0;
        background-image:url("${backUrl}");
        font-size:0px;pointer-events:none;margin-top:-1px;`, 
      viewBox=`0 0 ${w} ${h}`
      )
    g
      foreignObject(x='0', y='0', width=`${w}`, height=`${h}`,)
        svg(
          style=`display: inline-block;width:100%;vertical-align: top;background-position:0% 0%;
            background-repeat:no-repeat;background-size:100%;background-attachment:scroll; 
            background-image:url("${flashUrl}");
            -webkit-tap-highlight-color:transparent;-webkit-user-select:none;`, 
          viewBox=`0 0 ${w} ${h}`)
      animate(attributeName=`opacity`, values=`1;0;1`, dur=`1s`, repeatCount="indefinite")
      //- animate(attributeName=`opacity`, values=`1;0;1`, dur=`1s`, repeatCount="indefinite")
